ci: pin integration tests to Cacti 1.2.31 - #225
Open
somethingwithproof wants to merge 12 commits into
Open
Conversation
Pin actions/checkout (v5), shivammathur/setup-php (v2) and actions/upload-artifact (v4) to full commit SHAs with a trailing # vX comment. Mutable tags let a compromised or force-pushed tag run arbitrary code in CI; pinning to an immutable SHA is the supply-chain-hardening best practice and matches the SHA-pinned checkout used in the core security workflow.
Keep 1.2.31 pin while covering mid-stream PHP releases. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
This was referenced Aug 17, 2026
somethingwithproof
added a commit
to somethingwithproof/plugin_monitor
that referenced
this pull request
Aug 18, 2026
The plugin shipped three test files that nothing ran: the workflow had no reference to tests/ at all, so a suite covering request-variable output escaping sat unexecuted. Adopts the Pest-through-composer pattern from thold and mactrack, with a bootstrap that stubs Cacti so plugin code loads without a full install. Two of the three existing files were meaningful grep guards against raw request reuse and are kept as Pest datasets; the third only asserted that htmlspecialchars() works. Pest 2 rather than mactrack's Pest 1, which no longer runs on current PHP. The PHP 8.0 runtime floor is enforced by the syntax-floor job rather than a composer platform pin, since the dev tooling needs 8.1. Stacked on Cacti#225, so the SHA pinning and permissions block are inherited rather than duplicated. Dependabot is left to Cacti#226. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
marked this pull request as ready for review
August 29, 2026 05:53
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The workflow introduces additional environment/DB-auth changes beyond the stated scope (notably the MariaDB version bump and grants to cactiuser@localhost despite TCP DB connections), which could break or materially change CI behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the GitHub Actions integration workflow for the Monitor plugin, primarily to run CI against the pinned Cacti release/1.2.31 branch so the workflow tests the declared compatibility contract instead of a moving ref.
Changes:
- Pin the Cacti checkout in CI to
release/1.2.31. - Harden CI workflow execution (pinned action SHAs, concurrency/permissions, artifact upload on failure) and adjust bootstrap/lint steps.
File summaries
| File | Description |
|---|---|
| .github/workflows/plugin-ci-workflow.yml | Pins Cacti checkout to release/1.2.31 and adjusts CI triggers/bootstrap/lint behavior for integration testing. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The service container publishes a port, so Cacti reaches MariaDB from the Docker gateway address and matches cactiuser@'%', not cactiuser@localhost. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pins the Cacti checkout used by the integration workflow to
release/1.2.31, so CI exercises the declared 1.2.31 compatibility contract instead of a moving development branch.The branch carries the rest of the workflow cleanup with it:
Monitor CI, add path filters,workflow_dispatch, acontents: readpermissions block and a concurrency groupactions/checkout,shivammathur/setup-phpandactions/upload-artifactto commit SHAs'cactiuser'@'%'. The service container publishes a port, so Cacti connects from the Docker gateway address and matches@'%', not@'localhost', which leftmysql.time_zone_nameunreadable~/.my.cnffile and useMYSQL_PWDwith explicit--hostand--uservendor/in the plugin syntax check and fail on the first error rather than on a grep of the output.phpstan.neon,include/vendor/binandcomposer run-script lint/phpcsfixersteps so a missing file no longer aborts the joblog/cacti.logas an artifact when a job failsValidation:
actionlintreports nothing on the workflow. A localmariadb:10.11container with the same service environment confirms an external TCP connection matches'cactiuser'@'%', that the old@'localhost'grant leftmysql.time_zone_namedenied, and that the corrected grant makes it readable.Closes #230